package com.yz.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yz.common.utils.PageUtils;
import com.yz.common.utils.R;
import com.yz.gulimall.member.entity.MemberEntity;
import com.yz.gulimall.member.exception.PhoneExistException;
import com.yz.gulimall.member.exception.UserExistException;
import com.yz.gulimall.member.vo.MemberLoginVo;
import com.yz.gulimall.member.vo.MemberRegistVo;
import com.yz.gulimall.member.vo.SocialUser;

import java.util.Map;

/**
 * 会员
 *
 * @author yuzhou
 * @email yuzhouwork9@163.com
 * @date 2021-10-30 00:58:40
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    R regist(MemberRegistVo vo);

    void checkPhoneUnique(String phone) throws PhoneExistException;
    void checkUsernameUnique(String username) throws UserExistException;

    MemberEntity login(MemberLoginVo vo);

    MemberEntity login(SocialUser socialUser) throws Exception;
}

